package es.pawer.web.checklists.data;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

public class PersistenceMFactory {

	private static PersistenceManager myPM=null;

	/**
	 * No instance is needed, methods are static
	 */
	private PersistenceMFactory() {  
	}

	public static PersistenceManager getPM() { 
		if (myPM==null) {
			PersistenceManagerFactory pmfInstance = JDOHelper  
					.getPersistenceManagerFactory("transactions-optional");
			myPM=pmfInstance.getPersistenceManager();
		}
		return myPM;  
	} 
}
